<extend name="Public/base"/>
<block name="style">
    <link rel="stylesheet" href="__STATIC__/plugins/data-tables/DT_bootstrap.css" />
</block>
<block name="body">

    <div class="row">
        <div class="col-md-12">
            <!-- BEGIN EXAMPLE TABLE PORTLET-->
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="fa fa-globe"></i>学期信息</div>
                    <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                        <a href="#portlet-config" data-toggle="modal" class="config"></a>
                        <a href="javascript:;" class="reload"></a>
                    </div>
                </div>
                <div class="portlet-body">
                    <div class="table-toolbar">
                        <div class="btn-group">
                            <a class="btn green" href="{:U('addseme')}">新 增</a>
                        </div>
                    </div>
                    <table class="table table-striped table-bordered table-hover" id="sample">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>名称</th>
                            <th>开始时间</th>
                            <th>结束时间</th>
                            <th>备注</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="_list" id="vo">
                            <tr class="odd gradeX">
                                <td>{$vo.sid}</td>
                                <td>{$vo.title}</td>
                                <td>{$vo.start_time}</td>
                                <td>{$vo.end_time}</td>
                                <td>{$vo.remark}</td>
                                <td>
                                    <if condition="$vo.default_id eq 1">
                                        <b class="text-danger">当前学期</b>
                                        <elseif condition="$vo.default eq 0"/>
                                        禁用
                                        <elseif condition="$vo.default eq 1"/>
                                        启用
                                    </if>
                                </td>
                                <td>
                                    <a class="ajax-get confirm" href="{:U('default_seme?sid='.$vo['sid'])}">本学期</a>
                                    <a>编辑</a>
                                    <a>禁用</a>
                                    <a>删除</a>
                                </td>

                            </tr>
                        </volist>
                        </tbody>
                    </table>

                    <div class="page">
                        {$_page}
                    </div>
                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>

</block>

<block name="script">
    <script type="text/javascript" src="__STATIC__/plugins/data-tables/jquery.dataTables.js"></script>
    <script type="text/javascript" src="__STATIC__/plugins/data-tables/DT_bootstrap.js"></script>
    <script src="__STATIC__/scripts/app.js"></script>
    <script src="__STATIC__/scripts/table-managed.js"></script>
    <script>

        jQuery(document).ready(function() {
            App.init();
            TableManaged.init();

        });

    </script>
</block>
